package systemEntity

import (
	"github.com/goravel/framework/database/orm"
)

type Role struct {
	orm.Model
	SiteID            uint                `gorm:"type:int;column:site_id;not null;" form:"site_id" json:"site_id"`
	Name              string              `gorm:"type:varchar(255);column:name;not null;unique" form:"name" json:"name"`
	Value             string              `gorm:"type:varchar(255);column:value;not null;unique" form:"value" json:"value"`
	Remark            string              `gorm:"type:varchar(255);column:remark;not null;" form:"remark" json:"remark"`
	Status            int                 `gorm:"type:int;column:status;not null;" form:"status" json:"status"`
	Permissions       []*Permission       `gorm:"many2many:role_permissions;" form:"permissions"  json:"permissions"`
	ButtonPermissions []*ButtonPermission `gorm:"many2many:role_button_permissions;" form:"role_button_permissions"  json:"role_button_permissions"`
	orm.SoftDeletes
}
